import {ref, computed} from 'vue'

const useCommonStore = defineStore('common', () => {
    const screenWidth = ref(document.body.clientWidth)

    const getterScreenWidth = computed( () => {
        return screenWidth.value
    })

    const changeScreenWidth = function (data) {
        screenWidth.value = data
    }
    return {
        screenWidth,
        getterScreenWidth,
        changeScreenWidth
    };
})

export default useCommonStore

